<%@ page pageEncoding="utf-8"%>
<%@page import="java.util.*,edu.pet.entity.*" %>
<html>
  <head>
    <link rel="stylesheet" type="text/css" href="allpage.css" >
    <title>宠物诊所</title>
  </head>
  <script type="text/javascript" src="../user/table_style.js"></script>
  <%
  	ArrayList<Pets_Owners> pets_owners = new ArrayList<Pets_Owners>();
  	pets_owners = (ArrayList<Pets_Owners>)session.getAttribute("pets_owners");
  	Iterator<Pets_Owners> iter = pets_owners.iterator();
  	Pets_Owners one;
  %>
  <body>
	  <div class="background">
	  <jsp:include page="suc.jsp"></jsp:include>
	  	<div class="contentDiv" >
	  		<table align="center" width="400px" >
	  			<tr>
	  				<td width="50%" >宠物名</td>
	  				<td>主人</td>
	  			</tr>
	  			<%
	  				while(iter.hasNext()){
	  					one = iter.next();
	  			%>
	  			<tr>
	  				<td>
	  					<a href="../servlet/PetServlet?id=<%=one.getPet_id() %>"><%=one.getPet_name() %></a>
	  				</td>
	  				<td>
	  					<a href="../servlet/OwnerServlet?id=<%=one.getOwner_id() %>"><%=one.getOwner_name() %></a>
	  				</td>
	  			</tr>
	  			<%
	  				}
	  			%>
	  			<tr>
	  				<td><input type="button" value="重新查询" onclick="javascript:window.location='petsearch.jsp'"/></td>
	  				<td></td>
	  			</tr>
	  		</table>
	  	</div>
	  </div>
  </body>
</html>
